﻿using Abp.Application.Services;
using FwProject.Com.Dto;
using FwProject.Commodity.Dto;
using FwProject.ShopApplication;
using FwProject.ShoppingMall.Com;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using X.PagedList;

namespace FwProject.Com
{
    /// <summary>
    /// 评论管理
    /// </summary>
   public  interface ICommodityReviewsAppService : IApplicationService
    {
        /// <summary>
        /// 获取一条评论信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<CommodityReviewsDto> GetById(Guid id);
        /// <summary>
        /// 删除一条评论信息
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteCommodityReviews(Guid id);
        /// <summary>
        /// 创建一条评论信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<Guid> CreateCommodityReviews(CommodityReviewsInput model);

        /// <summary>
        /// 修改一条评论信息
        /// </summary>
        /// <param name="Id"></param>
        /// <param name="model"></param>
        /// <returns></returns>
        Task UpdateCommodityReviews(CommodityReviewsAppUpdateDto model);
        /// <summary>
        /// 获取我的评论商品列表
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        Task<IPagedList<CommodityReviewsProductShopDto>> GetCommodityReviewsProductShopDto(int page, int pageSize);
        /// <summary>
        /// 获取商品的评论信息
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<IPagedList<CommodityReviewsProductShopDto>> GetProductShopCommodityReviewsDto(int page, int pageSize, Guid id, int? CommentScore);


        #region 后台管理
        /// <summary>
        /// 获取评论列表
        /// </summary>
        /// <param name="page"></param>
        /// <param name="limit"></param>
        /// <returns></returns>
        Task<LayerDataBaseDto> GetCommodityReviewsLayerDataAsync(int page, int limit);
        /// <summary>
        /// 商品详情页获取商品的评论信息
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pageSize"></param>
        /// <param name="id"></param>
        /// <param name="CommentScore"></param>
        /// <returns></returns>

        Task<IPagedList<CommodityReviewsShopDetailsDto>> GetProductShopDetailsCommodityReviewsDto(int page, int pageSize, Guid id, int? CommentScore);

        #endregion
    }
}
